"""xiaomishop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""

from django.urls import path
from . import views

urlpatterns = [
    # 所有的轮播图数据
    path('carouseles/', views.CarouselView.as_view()),
    # 根据类别名获取商品数据
    path('oneCategory/goods/', views.GoodsByCateName.as_view()),
    # 热门商品
    path('getHotProduct/', views.HotProductViews.as_view()),
    # 获取所有的类别
    path('cates/', views.CategoryView.as_view()),
    # 根据类别获取商品
    path('good/getProductByCategory/', views.GoodsByCategoryId.as_view()),
    # 获取所有的商品
    path('good/getAllProduct/', views.GoodsViews.as_view()),
    # 根据商品id获取商品图片
    path("onegood/imgs/", views.GoodPicture.as_view()),
    # 根据商品id获取商品
    path('gooddetail/', views.GoodDetail.as_view()),
    # 添加历史浏览记录
    path('oneGood/history/', views.AddHistory.as_view()),
    # 添加收藏
    path('collects/', views.CollectViews.as_view()),
    # 查看收藏
    path('collects/all/', views.CollectInfoView.as_view()),
    # 删除路由
    path('collects/del/', views.CollectDelView.as_view())
]
